FROM java:8-jre-alpine
MAINTAINER <神盾局 hulk@3j168.cn>
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories
LABEL Description="支付系统"
# 创建日志文件
RUN mkdir -p /var/pay
RUN touch /var/pay/pay.log
RUN mkdir /usr/pay
ADD ./target/*.jar /usr/pay/pay.jar
RUN sh -c 'touch /pay.jar'
RUN echo $(date) > /image_built_at

WORKDIR /usr/pay

EXPOSE 8080
CMD ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/usr/pay/pay.jar"]
